A “container” is a set of computing resources or a bounded execution environment. For example, an operating system, being such an execution environment, is a container. For another example, Java Virtual Machine (JVM), being such an execution environment, is also a container. Multiple processes, threads, and/or applications may run within such execution environments.
Some containers are software constructs and some containers are hardware constructs. For example, a single computer is a container. Some complex computers can be subdivided into multiple “domains.” Each such domain is a separate container. On each domain, a separate operating system may run.
Some operating systems/execution environments may be subdivided into “projects,” which are also containers. A project is a collection of processes. Logical resources may be associated with, or allocated to, projects. For example, a share of a network interface may be associated with a particular project. For another example, a set of central processing units (CPUs) may be associated with a particular project. Processes that execute as part of a project may be limited to using the resources that are associated with, or allocated to, that project.
When an operating system is started on one of a plurality of domains, the operating system has no awareness that other domains beyond the domain upon which the operating system executes exist. Similarly, when a process is started in one of a plurality of projects, the process has no awareness that other projects beyond the project in which the process executes exist.
When processes are started, they might not be aware of the resources available to them. This is especially true for containers that are a few layers above the hardware. If, at the hardware level, someone decides to remove or add some resources, there is currently no way to notify dependent processes. The processes might not be able to satisfy their service level objectives if resources are removed. For example, if hardware resources are removed, then a process that was using those resources might not be able to service a formerly agreed-upon number of transactions per second. For another example, if memory is removed, then a process that was using that memory might not be able to perform a large table operation such as a matrix operation.
Additionally, when a hardware administrator removes a domain from a complex computer, the operating system that ran on that domain is instantly and ungracefully terminated. Any projects that existed within that operating system are destroyed. Any processes that ran within those projects are also instantly and ungracefully terminated. Such processes are unable to complete the tasks upon which they had been working. The hardware administrator has no easy way of knowing the repercussions of removing the domain. The hardware administrator does not know about the operating system, the projects, or the processes that all depend upon the domain.
The hardware administrator may assume that by removing the domain, all containers and processes within the domain will be lost. However, if the hardware administrator could be aware of the current states of these containers and processes, then the hardware administrator might choose to wait before removing the domain. For example, if the hardware administrator had some way of knowing that a process had been working within the domain for sixty hours, and that the process would produce the results of its work after five more minutes of execution, the hardware administrator might choose to wait for at least five more minutes before removing the domain. Unfortunately, the hardware administrator has no easy way of discovering such facts.
Conversely, the processes executing within a container that is about to be eliminated often have no way of determining that the container is about to be eliminated. This is especially so when the processes execute immediately within another container that is contained within the container that is about to be eliminated. If the processes had some way of knowing that the elimination of the container was imminent, then the processes might be able to prepare for their impending end. For example, a process that was notified that the end was near might produce the partial results of its work, delete any temporary files that it had been using, and terminate gracefully. Unfortunately, processes often have no way of knowing that the containers in and on which they run are about to be eliminated.